<?php


abstract class BaseTabPersonalLaboral extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $cf_grupo;


	
	protected $cedula;


	
	protected $nacionalidad;


	
	protected $cf_nucleo;


	
	protected $nombre;


	
	protected $apellido;


	
	protected $fecha_nacimiento;


	
	protected $sexo;


	
	protected $cod_movil;


	
	protected $tel_movil;


	
	protected $cod_habitacion;


	
	protected $tel_habitacion;


	
	protected $correo_electronico;


	
	protected $cf_estado;


	
	protected $cf_municipio;


	
	protected $cf_ciudad;


	
	protected $direccion;


	
	protected $fecha_ingreso;


	
	protected $estatus;

	
	protected $aTabGrupo;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getCfGrupo()
	{

		return $this->cf_grupo;
	}

	
	public function getCedula()
	{

		return $this->cedula;
	}

	
	public function getNacionalidad()
	{

		return $this->nacionalidad;
	}

	
	public function getCfNucleo()
	{

		return $this->cf_nucleo;
	}

	
	public function getNombre()
	{

		return $this->nombre;
	}

	
	public function getApellido()
	{

		return $this->apellido;
	}

	
	public function getFechaNacimiento($format = 'Y-m-d')
	{

		if ($this->fecha_nacimiento === null || $this->fecha_nacimiento === '') {
			return null;
		} elseif (!is_int($this->fecha_nacimiento)) {
						$ts = strtotime($this->fecha_nacimiento);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [fecha_nacimiento] as date/time value: " . var_export($this->fecha_nacimiento, true));
			}
		} else {
			$ts = $this->fecha_nacimiento;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getSexo()
	{

		return $this->sexo;
	}

	
	public function getCodMovil()
	{

		return $this->cod_movil;
	}

	
	public function getTelMovil()
	{

		return $this->tel_movil;
	}

	
	public function getCodHabitacion()
	{

		return $this->cod_habitacion;
	}

	
	public function getTelHabitacion()
	{

		return $this->tel_habitacion;
	}

	
	public function getCorreoElectronico()
	{

		return $this->correo_electronico;
	}

	
	public function getCfEstado()
	{

		return $this->cf_estado;
	}

	
	public function getCfMunicipio()
	{

		return $this->cf_municipio;
	}

	
	public function getCfCiudad()
	{

		return $this->cf_ciudad;
	}

	
	public function getDireccion()
	{

		return $this->direccion;
	}

	
	public function getFechaIngreso($format = 'Y-m-d')
	{

		if ($this->fecha_ingreso === null || $this->fecha_ingreso === '') {
			return null;
		} elseif (!is_int($this->fecha_ingreso)) {
						$ts = strtotime($this->fecha_ingreso);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [fecha_ingreso] as date/time value: " . var_export($this->fecha_ingreso, true));
			}
		} else {
			$ts = $this->fecha_ingreso;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getEstatus()
	{

		return $this->estatus;
	}

	
	public function setCfGrupo($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cf_grupo !== $v) {
			$this->cf_grupo = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::CF_GRUPO;
		}

		if ($this->aTabGrupo !== null && $this->aTabGrupo->getIdGrupo() !== $v) {
			$this->aTabGrupo = null;
		}

	} 
	
	public function setCedula($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cedula !== $v) {
			$this->cedula = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::CEDULA;
		}

	} 
	
	public function setNacionalidad($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->nacionalidad !== $v) {
			$this->nacionalidad = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::NACIONALIDAD;
		}

	} 
	
	public function setCfNucleo($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cf_nucleo !== $v) {
			$this->cf_nucleo = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::CF_NUCLEO;
		}

	} 
	
	public function setNombre($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->nombre !== $v) {
			$this->nombre = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::NOMBRE;
		}

	} 
	
	public function setApellido($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->apellido !== $v) {
			$this->apellido = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::APELLIDO;
		}

	} 
	
	public function setFechaNacimiento($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [fecha_nacimiento] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->fecha_nacimiento !== $ts) {
			$this->fecha_nacimiento = $ts;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::FECHA_NACIMIENTO;
		}

	} 
	
	public function setSexo($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->sexo !== $v) {
			$this->sexo = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::SEXO;
		}

	} 
	
	public function setCodMovil($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cod_movil !== $v) {
			$this->cod_movil = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::COD_MOVIL;
		}

	} 
	
	public function setTelMovil($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->tel_movil !== $v) {
			$this->tel_movil = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::TEL_MOVIL;
		}

	} 
	
	public function setCodHabitacion($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cod_habitacion !== $v) {
			$this->cod_habitacion = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::COD_HABITACION;
		}

	} 
	
	public function setTelHabitacion($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->tel_habitacion !== $v) {
			$this->tel_habitacion = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::TEL_HABITACION;
		}

	} 
	
	public function setCorreoElectronico($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->correo_electronico !== $v) {
			$this->correo_electronico = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::CORREO_ELECTRONICO;
		}

	} 
	
	public function setCfEstado($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cf_estado !== $v) {
			$this->cf_estado = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::CF_ESTADO;
		}

	} 
	
	public function setCfMunicipio($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cf_municipio !== $v) {
			$this->cf_municipio = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::CF_MUNICIPIO;
		}

	} 
	
	public function setCfCiudad($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cf_ciudad !== $v) {
			$this->cf_ciudad = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::CF_CIUDAD;
		}

	} 
	
	public function setDireccion($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->direccion !== $v) {
			$this->direccion = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::DIRECCION;
		}

	} 
	
	public function setFechaIngreso($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [fecha_ingreso] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->fecha_ingreso !== $ts) {
			$this->fecha_ingreso = $ts;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::FECHA_INGRESO;
		}

	} 
	
	public function setEstatus($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->estatus !== $v) {
			$this->estatus = $v;
			$this->modifiedColumns[] = TabPersonalLaboralPeer::ESTATUS;
		}

	} 
	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->cf_grupo = $rs->getString($startcol + 0);

			$this->cedula = $rs->getString($startcol + 1);

			$this->nacionalidad = $rs->getString($startcol + 2);

			$this->cf_nucleo = $rs->getString($startcol + 3);

			$this->nombre = $rs->getString($startcol + 4);

			$this->apellido = $rs->getString($startcol + 5);

			$this->fecha_nacimiento = $rs->getDate($startcol + 6, null);

			$this->sexo = $rs->getString($startcol + 7);

			$this->cod_movil = $rs->getString($startcol + 8);

			$this->tel_movil = $rs->getString($startcol + 9);

			$this->cod_habitacion = $rs->getString($startcol + 10);

			$this->tel_habitacion = $rs->getString($startcol + 11);

			$this->correo_electronico = $rs->getString($startcol + 12);

			$this->cf_estado = $rs->getString($startcol + 13);

			$this->cf_municipio = $rs->getString($startcol + 14);

			$this->cf_ciudad = $rs->getString($startcol + 15);

			$this->direccion = $rs->getString($startcol + 16);

			$this->fecha_ingreso = $rs->getDate($startcol + 17, null);

			$this->estatus = $rs->getString($startcol + 18);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 19; 
		} catch (Exception $e) {
			throw new PropelException("Error populating TabPersonalLaboral object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(TabPersonalLaboralPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			TabPersonalLaboralPeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(TabPersonalLaboralPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


												
			if ($this->aTabGrupo !== null) {
				if ($this->aTabGrupo->isModified()) {
					$affectedRows += $this->aTabGrupo->save($con);
				}
				$this->setTabGrupo($this->aTabGrupo);
			}


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = TabPersonalLaboralPeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setNew(false);
				} else {
					$affectedRows += TabPersonalLaboralPeer::doUpdate($this, $con);
				}
				$this->resetModified(); 			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


												
			if ($this->aTabGrupo !== null) {
				if (!$this->aTabGrupo->validate($columns)) {
					$failureMap = array_merge($failureMap, $this->aTabGrupo->getValidationFailures());
				}
			}


			if (($retval = TabPersonalLaboralPeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = TabPersonalLaboralPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getCfGrupo();
				break;
			case 1:
				return $this->getCedula();
				break;
			case 2:
				return $this->getNacionalidad();
				break;
			case 3:
				return $this->getCfNucleo();
				break;
			case 4:
				return $this->getNombre();
				break;
			case 5:
				return $this->getApellido();
				break;
			case 6:
				return $this->getFechaNacimiento();
				break;
			case 7:
				return $this->getSexo();
				break;
			case 8:
				return $this->getCodMovil();
				break;
			case 9:
				return $this->getTelMovil();
				break;
			case 10:
				return $this->getCodHabitacion();
				break;
			case 11:
				return $this->getTelHabitacion();
				break;
			case 12:
				return $this->getCorreoElectronico();
				break;
			case 13:
				return $this->getCfEstado();
				break;
			case 14:
				return $this->getCfMunicipio();
				break;
			case 15:
				return $this->getCfCiudad();
				break;
			case 16:
				return $this->getDireccion();
				break;
			case 17:
				return $this->getFechaIngreso();
				break;
			case 18:
				return $this->getEstatus();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = TabPersonalLaboralPeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getCfGrupo(),
			$keys[1] => $this->getCedula(),
			$keys[2] => $this->getNacionalidad(),
			$keys[3] => $this->getCfNucleo(),
			$keys[4] => $this->getNombre(),
			$keys[5] => $this->getApellido(),
			$keys[6] => $this->getFechaNacimiento(),
			$keys[7] => $this->getSexo(),
			$keys[8] => $this->getCodMovil(),
			$keys[9] => $this->getTelMovil(),
			$keys[10] => $this->getCodHabitacion(),
			$keys[11] => $this->getTelHabitacion(),
			$keys[12] => $this->getCorreoElectronico(),
			$keys[13] => $this->getCfEstado(),
			$keys[14] => $this->getCfMunicipio(),
			$keys[15] => $this->getCfCiudad(),
			$keys[16] => $this->getDireccion(),
			$keys[17] => $this->getFechaIngreso(),
			$keys[18] => $this->getEstatus(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = TabPersonalLaboralPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setCfGrupo($value);
				break;
			case 1:
				$this->setCedula($value);
				break;
			case 2:
				$this->setNacionalidad($value);
				break;
			case 3:
				$this->setCfNucleo($value);
				break;
			case 4:
				$this->setNombre($value);
				break;
			case 5:
				$this->setApellido($value);
				break;
			case 6:
				$this->setFechaNacimiento($value);
				break;
			case 7:
				$this->setSexo($value);
				break;
			case 8:
				$this->setCodMovil($value);
				break;
			case 9:
				$this->setTelMovil($value);
				break;
			case 10:
				$this->setCodHabitacion($value);
				break;
			case 11:
				$this->setTelHabitacion($value);
				break;
			case 12:
				$this->setCorreoElectronico($value);
				break;
			case 13:
				$this->setCfEstado($value);
				break;
			case 14:
				$this->setCfMunicipio($value);
				break;
			case 15:
				$this->setCfCiudad($value);
				break;
			case 16:
				$this->setDireccion($value);
				break;
			case 17:
				$this->setFechaIngreso($value);
				break;
			case 18:
				$this->setEstatus($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = TabPersonalLaboralPeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setCfGrupo($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setCedula($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setNacionalidad($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setCfNucleo($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setNombre($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setApellido($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setFechaNacimiento($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setSexo($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setCodMovil($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setTelMovil($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setCodHabitacion($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setTelHabitacion($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setCorreoElectronico($arr[$keys[12]]);
		if (array_key_exists($keys[13], $arr)) $this->setCfEstado($arr[$keys[13]]);
		if (array_key_exists($keys[14], $arr)) $this->setCfMunicipio($arr[$keys[14]]);
		if (array_key_exists($keys[15], $arr)) $this->setCfCiudad($arr[$keys[15]]);
		if (array_key_exists($keys[16], $arr)) $this->setDireccion($arr[$keys[16]]);
		if (array_key_exists($keys[17], $arr)) $this->setFechaIngreso($arr[$keys[17]]);
		if (array_key_exists($keys[18], $arr)) $this->setEstatus($arr[$keys[18]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(TabPersonalLaboralPeer::DATABASE_NAME);

		if ($this->isColumnModified(TabPersonalLaboralPeer::CF_GRUPO)) $criteria->add(TabPersonalLaboralPeer::CF_GRUPO, $this->cf_grupo);
		if ($this->isColumnModified(TabPersonalLaboralPeer::CEDULA)) $criteria->add(TabPersonalLaboralPeer::CEDULA, $this->cedula);
		if ($this->isColumnModified(TabPersonalLaboralPeer::NACIONALIDAD)) $criteria->add(TabPersonalLaboralPeer::NACIONALIDAD, $this->nacionalidad);
		if ($this->isColumnModified(TabPersonalLaboralPeer::CF_NUCLEO)) $criteria->add(TabPersonalLaboralPeer::CF_NUCLEO, $this->cf_nucleo);
		if ($this->isColumnModified(TabPersonalLaboralPeer::NOMBRE)) $criteria->add(TabPersonalLaboralPeer::NOMBRE, $this->nombre);
		if ($this->isColumnModified(TabPersonalLaboralPeer::APELLIDO)) $criteria->add(TabPersonalLaboralPeer::APELLIDO, $this->apellido);
		if ($this->isColumnModified(TabPersonalLaboralPeer::FECHA_NACIMIENTO)) $criteria->add(TabPersonalLaboralPeer::FECHA_NACIMIENTO, $this->fecha_nacimiento);
		if ($this->isColumnModified(TabPersonalLaboralPeer::SEXO)) $criteria->add(TabPersonalLaboralPeer::SEXO, $this->sexo);
		if ($this->isColumnModified(TabPersonalLaboralPeer::COD_MOVIL)) $criteria->add(TabPersonalLaboralPeer::COD_MOVIL, $this->cod_movil);
		if ($this->isColumnModified(TabPersonalLaboralPeer::TEL_MOVIL)) $criteria->add(TabPersonalLaboralPeer::TEL_MOVIL, $this->tel_movil);
		if ($this->isColumnModified(TabPersonalLaboralPeer::COD_HABITACION)) $criteria->add(TabPersonalLaboralPeer::COD_HABITACION, $this->cod_habitacion);
		if ($this->isColumnModified(TabPersonalLaboralPeer::TEL_HABITACION)) $criteria->add(TabPersonalLaboralPeer::TEL_HABITACION, $this->tel_habitacion);
		if ($this->isColumnModified(TabPersonalLaboralPeer::CORREO_ELECTRONICO)) $criteria->add(TabPersonalLaboralPeer::CORREO_ELECTRONICO, $this->correo_electronico);
		if ($this->isColumnModified(TabPersonalLaboralPeer::CF_ESTADO)) $criteria->add(TabPersonalLaboralPeer::CF_ESTADO, $this->cf_estado);
		if ($this->isColumnModified(TabPersonalLaboralPeer::CF_MUNICIPIO)) $criteria->add(TabPersonalLaboralPeer::CF_MUNICIPIO, $this->cf_municipio);
		if ($this->isColumnModified(TabPersonalLaboralPeer::CF_CIUDAD)) $criteria->add(TabPersonalLaboralPeer::CF_CIUDAD, $this->cf_ciudad);
		if ($this->isColumnModified(TabPersonalLaboralPeer::DIRECCION)) $criteria->add(TabPersonalLaboralPeer::DIRECCION, $this->direccion);
		if ($this->isColumnModified(TabPersonalLaboralPeer::FECHA_INGRESO)) $criteria->add(TabPersonalLaboralPeer::FECHA_INGRESO, $this->fecha_ingreso);
		if ($this->isColumnModified(TabPersonalLaboralPeer::ESTATUS)) $criteria->add(TabPersonalLaboralPeer::ESTATUS, $this->estatus);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(TabPersonalLaboralPeer::DATABASE_NAME);

		$criteria->add(TabPersonalLaboralPeer::CEDULA, $this->cedula);
		$criteria->add(TabPersonalLaboralPeer::NACIONALIDAD, $this->nacionalidad);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		$pks = array();

		$pks[0] = $this->getCedula();

		$pks[1] = $this->getNacionalidad();

		return $pks;
	}

	
	public function setPrimaryKey($keys)
	{

		$this->setCedula($keys[0]);

		$this->setNacionalidad($keys[1]);

	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setCfGrupo($this->cf_grupo);

		$copyObj->setCfNucleo($this->cf_nucleo);

		$copyObj->setNombre($this->nombre);

		$copyObj->setApellido($this->apellido);

		$copyObj->setFechaNacimiento($this->fecha_nacimiento);

		$copyObj->setSexo($this->sexo);

		$copyObj->setCodMovil($this->cod_movil);

		$copyObj->setTelMovil($this->tel_movil);

		$copyObj->setCodHabitacion($this->cod_habitacion);

		$copyObj->setTelHabitacion($this->tel_habitacion);

		$copyObj->setCorreoElectronico($this->correo_electronico);

		$copyObj->setCfEstado($this->cf_estado);

		$copyObj->setCfMunicipio($this->cf_municipio);

		$copyObj->setCfCiudad($this->cf_ciudad);

		$copyObj->setDireccion($this->direccion);

		$copyObj->setFechaIngreso($this->fecha_ingreso);

		$copyObj->setEstatus($this->estatus);


		$copyObj->setNew(true);

		$copyObj->setCedula(NULL); 
		$copyObj->setNacionalidad(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new TabPersonalLaboralPeer();
		}
		return self::$peer;
	}

	
	public function setTabGrupo($v)
	{


		if ($v === null) {
			$this->setCfGrupo(NULL);
		} else {
			$this->setCfGrupo($v->getIdGrupo());
		}


		$this->aTabGrupo = $v;
	}


	
	public function getTabGrupo($con = null)
	{
				include_once 'lib/model/om/BaseTabGrupoPeer.php';

		if ($this->aTabGrupo === null && (($this->cf_grupo !== "" && $this->cf_grupo !== null))) {

			$this->aTabGrupo = TabGrupoPeer::retrieveByPK($this->cf_grupo, $con);

			
		}
		return $this->aTabGrupo;
	}

} 